#include <bits/stdc++.h>
using namespace std;

int n;
int r1[100005];
int r2[100005];
int dp[100005];
int p = 0;
int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);

    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        int t;
        cin >> t;
        r1[++p] = t;
        r2[t]++;
    }
    sort(r1 + 1, r1 + p + 1);

    dp[1] = r2[r1[1]];
    for (int i = 2; i <= p; i++)
    {
        dp[i] = max((dp[i - 1] - r2[r1[i]]), 0) + r2[r1[i]];
    }
    cout << dp[p] << endl;

    fclose(stdin);
    fclose(stdout);
    return 0;
} //dp[i]=max{dp[i-1]-r[i],0}+r[i];//i-1 is the last